home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / crypt.z / crypt
Encoding:
Text File  |  1998-10-20  |  3.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. CCCCRRRRYYYYPPPPTTTT((((3333CCCC))))                                                            CCCCRRRRYYYYPPPPTTTT((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      crypt, setkey, encrypt - generate hashing encryption
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ccccrrrryyyypppptttt....hhhh>>>>
  13.  
  14.      cccchhhhaaaarrrr ****ccccrrrryyyypppptttt((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****kkkkeeeeyyyy,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ssssaaaalllltttt))));;;;
  15.  
  16.      vvvvooooiiiidddd sssseeeettttkkkkeeeeyyyy((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****kkkkeeeeyyyy))));;;;
  17.  
  18.      vvvvooooiiiidddd eeeennnnccccrrrryyyypppptttt((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****bbbblllloooocccckkkk,,,, iiiinnnntttt iiiiggggnnnnoooorrrreeeedddd))));;;;
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      _c_r_y_p_t is the password encryption function.  It is based on a one way
  22.      hashing encryption algorithm with variations intended (among other
  23.      things) to frustrate use of hardware implementations of a key search.
  24.  
  25.      _K_e_y is the input string to encrypt, for instance, a user's typed
  26.      password.  _S_a_l_t is a two-character string chosen from the set [aaaa----zzzzAAAA----ZZZZ0000----
  27.      9999....////]; this string is used to perturb the hashing algorithm in one of 4096
  28.      different ways, after which the password is used as the key to encrypt
  29.      repeatedly a constant string.  The returned value points to the encrypted
  30.      password.  The first two characters are the salt itself.
  31.  
  32.      The _s_e_t_k_e_y and _e_n_c_r_y_p_t entries provide (rather primitive) access to the
  33.      actual hashing algorithm.  The argument of _s_e_t_k_e_y is a character array of
  34.      length 64 containing only the characters with numerical value 0 and 1.
  35.      If this string is divided into groups of 8, the low-order bit in each
  36.      group is ignored; this gives a 56-bit key which is set into the machine.
  37.      This is the key that will be used with the hashing algorithm to encrypt
  38.      the string _b_l_o_c_k with the function _e_n_c_r_y_p_t.
  39.  
  40.      The argument to the _e_n_c_r_y_p_t entry is a character array of length 64
  41.      containing only the characters with numerical value 0 and 1.  The
  42.      argument array is modified in place to a similar array representing the
  43.      bits of the argument after having been subjected to the hashing algorithm
  44.      using the key set by _s_e_t_k_e_y.  _I_g_n_o_r_e_d is unused by _e_n_c_r_y_p_t but it must be
  45.      present.
  46.  
  47. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  48.      login(1), passwd(1), getpass(3C), passwd(4)
  49.  
  50. CCCCAAAAVVVVEEEEAAAATTTT
  51.      The return value points to static data that are overwritten by each call.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.